Skip to content

test(cleanup): calibrate S1-mini stylings across general and email layouts - #283

Merged
hadrysm merged 2 commits into
mainfrom
feat/style-calibration
Oct 16, 2026
Merged

hadrysm merged 2 commits into
mainfrom
feat/style-calibration

Conversation

@hadrysm

@hadrysm hadrysm commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Part of #281

Why

Per-app Style maps three product styles (Formal, Casual, Very casual) and an email layout onto S1-mini's trained Styling and Context tags. Nobody had measured what each tag really produces, so the mapping and the card copy would have been guesses. The calibration script swept only the four Styling tags, and the prompt pinned [Context: general].

This PR makes the sweep cover 4 Styling tags × 2 Context values, adds the fixtures the decisions need, and records what the real model returned. The tables and decisions below are the deliverable.

Scope

  • prompt.ts: CleanupStyle gains an optional context (general or email). Every app caller omits it, so the prompt bytes stay the same. The existing exact-bytes test proves that, and a new test checks the email control line.
  • calibrate.mts: sweeps each fixture under every styling and context. It records one JSONL row per fixture, styling and context, with that call's latency and every chunk the model returned. It then replays the plausibility guard over the rows as before. Old recordings do not load.
  • dictations.json: 19 new synthetic fixtures (chat lines, work messages, emails with greeting and sign-off, one-line replies, endings, names with acronyms, notes). A generated long-email of 432 words spans two 400-token chunks.

The recording is not committed.

Findings

Model s1-mini-q4_k_m.gguf. 121 fixtures × 8 = 968 rows, 1008 chunks, 77 rejected by the guard. Percentages count accepted rows over all fixtures, including the old ones.

styling context rows rejected p50 ms ends with . starts uppercase has line break same output as general
casual general 121 3 73 0% 0% 3% 121/121
semi-casual general 121 6 71 0% 12% 3% 121/121
semi-formal general 121 15 76 82% 93% 3% 121/121
formal general 121 12 75 85% 94% 3% 121/121
casual email 121 4 72 0% 0% 11% 101/121
semi-casual email 121 7 75 0% 11% 13% 92/121
semi-formal email 121 16 78 77% 94% 15% 90/121
formal email 121 12 77 80% 94% 13% 93/121

Casual's base tag: semi-formal

semi-casual is not "Caps". It lowercases sentence starts and only capitalizes I, names and acronyms. Rows start uppercase 12% of the time against 93% for semi-formal.

  • chat-coming-tonight, semi-casual: hey, are you coming tonight? um I was thinking we could grab pizza first. let me know.
  • work-status-update, semi-casual: hey team, quick update. um the API migration is done, and I deployed it to staging this morning. can someone review the PR before Friday?

semi-casual also keeps fillers. Spoken um/uh survived in 8 of 11 rows that had them, against 0 of 10 for semi-formal (chat-coming-tonight, work-status-update, email-deck). It already drops the final period (0% end with .).

semi-formal plus "drop one final period" gives caps, full inner punctuation, no fillers, and no meaning change. Example from chat-lunch: Hey, are you free for lunch tomorrow? Let's do 12 if that works for you.

Migration note for PR 2. Users on semi-casual who move to Casual will start seeing sentence caps and filler removal.

Very casual = S1 casual

  • Apostrophes. It strips every apostrophe, including possessives. All 10 rows whose input had one lost it. Examples: asr-possessive Let's meet at John's place. → lets meet at johns place, and asr-cant-wont → i cant make it and i wont be there.
  • Caps. It never capitalizes (0% of rows), including names and acronyms. names-github-api → can you ask kenji to push the fix to github before the api review with nasa?. Only dictionary rewrites, which run after cleanup, can restore taught casing.
  • Final period. It never ends with . (0%). Questions keep ? (9 of 9).
  • Fillers. It keeps some. fillers-mixed → um so basically the thing is ..., and chat-coming-tonight → ... tonight? um i was thinking ....

The card rule "No caps, no period at the end" is accurate. The example should show the missing apostrophes, because that is what users get.

Email layout: ship, gated to 10 words or more

With [Context: email], a dictated greeting, body and sign-off comes out as an email under semi-formal and formal.

  • email-deck semi-formal email: Hi Maria,⏎⏎Thanks for sending the deck. ... which I will send over tomorrow.⏎⏎Best,⏎Mateusz.
  • casual and semi-casual break after the greeting, but the sign-off stays on one line: ...tomorrow⏎⏎best mateusz.

Any message that opens with a greeting gets the greeting line under every styling: chat-lunch → Hey,⏎⏎Are you free .... In the Email category that is the point.

One-line replies mostly stay alone, but not reliably:

  • sounds good see you then and sure i attached the updated contract ... are unchanged under all four stylings.
  • thanks that works for me → Thanks,⏎⏎That works for me. under semi-formal and semi-casual. That is invented structure.
  • thanks → Thanks, under all four stylings.
  • alright see you then → See you then. under semi-formal. The guard rejected it, so raw text would be inserted.
  • um uh so like um you know uh → So, like, under semi-formal email, accepted. General gives an empty output.

Every regression above came from an input of 8 words or fewer. Every English fixture of 10 words or more that changed under email got a greeting line, paragraph breaks, or small punctuation and casing changes. The one exception is chat-running-late (14 words). Semi-formal email dropped "so", and the guard rejected it. The guard rejects about one more row per styling under email (4/7/16/12 against 3/6/15/12). Latency does not change (p50 within 3 ms).

Recommendation. Ship email layout in the Email category only when the transcript has at least 10 words and fits one chunk. Otherwise use general. The threshold comes from a small fixture set, so PR 2 should keep it in one named constant. The multi-chunk rule still earns its place, even though long-email came out clean (greeting in chunk 1, sign-off in chunk 2, nothing invented). That is one sample.

Also recommended. Use the email layout for Very casual too, not general. On email-deck, casual general keeps um and runs greeting, body and sign-off together. casual email drops the um and lays out the greeting: hi maria,⏎⏎thanks for sending the deck. ...⏎⏎best mateusz. That makes layout depend only on the category.

Casual and Formal look the same in Email. A laid-out email ends with the sign-off name, so dropping one final period changes nothing. email-deck and email-intro give byte-identical Formal and Casual outputs.

Final-period finish: refine the "internal period" rule

Endings of accepted semi-formal general rows (the Casual base, English only, n=103): 80 plain ., 9 ?, 4 a word with an internal period followed by ., 4 with no final punctuation, 5 empty.

  • p.m. The model never writes p.m.. It normalizes to 3pm/5pm (ending-pm-dotted → Can we move the call to tomorrow at 3pm?, ending-pm-spoken → I'll be home around 5pm.). formal once wrote Ten a.m. (spelled-am).
  • URL or decimal. For the docs, go to example.com., Go to www.example.com., ... docs.example.com/start., The value is 3.5.. Here the final . is a sentence period. The plan's rule ("keep if the last word holds an internal period") would leave it on under Casual.
  • Abbreviation. asr-et-cetera → Bring the slides, the notes, etc.. The plan's rule would cut it to etc.
  • Ellipsis. The model never outputs one. ending-trailing-off (... i dont know...) → I was going to say something, but I don't know.
  • Question. ? is kept on all 9 questions.

Recommendation for finishStyle. Keep the period only when the last word is a dotted abbreviation (/^([a-z]\.)+$/i: a.m., p.m., U.S., e.g.) or one of a short list (etc., vs., Mr., Mrs., Ms., Dr., Jr., Inc.). Otherwise drop it. This drops the period after example.com and 3.5, and keeps etc. and a.m.. Keep the ellipsis guard, because ASR text can carry one when cleanup is skipped.

Card examples (real outputs)

Formal is semi-formal. Casual is semi-formal with the final period dropped. Very casual is casual. Email rows use the email context.

Category Formal Casual Very casual
Personal (chat-lunch) Hey, are you free for lunch tomorrow? Let's do 12 if that works for you. Hey, are you free for lunch tomorrow? Let's do 12 if that works for you hey are you free for lunch tomorrow? lets do 12 if that works for you
Work (plain-anna) Hey Anna, can we move the sync to Thursday at 3pm? I'll send the notes to the team. Hey Anna, can we move the sync to Thursday at 3pm? I'll send the notes to the team hey anna can we move the sync to thursday at 3pm? ill send the notes to the team
Email (email-deck) Hi Maria,⏎⏎Thanks for sending the deck. I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, which I will send over tomorrow.⏎⏎Best,⏎Mateusz same as Formal (see above) hi maria,⏎⏎thanks for sending the deck. i went through it last night and the pricing section looks great. i have a couple of small notes on the timeline which i will send over tomorrow⏎⏎best mateusz
Other (note-reminder) Remember to buy milk and call the dentist on Thursday about the appointment. Remember to buy milk and call the dentist on Thursday about the appointment remember to buy milk and call the dentist on thursday about the appointment

To show a difference on the Email Casual card, email-reply-attached works: Formal Sure, I attached the updated contract. Let me know if you have any questions. and Casual ... if you have any questions.

work-status-update is a better Work message, but it ends in ?, so Formal and Casual would match.

Defects found on the way

Filed #282. The guard accepts an empty output for number-only speech (ten a m → "" under semi-formal, today's default). It also accepts The new build is up.check. Voice. for the new build is up check voice dot app under semi-formal and formal.

Per-fixture tables for the new fixtures (styling × context → output, guard, ms; ⏎ is a line break)

chat-coming-tonight raw: hey are you coming tonight um i was thinking we could grab pizza first let me know

styling context output guard ms
casual general hey are you coming tonight? um i was thinking we could grab pizza first. let me know ok 145
semi-casual general hey, are you coming tonight? um I was thinking we could grab pizza first. let me know ok 203
semi-formal general Hey, are you coming tonight? I was thinking we could grab pizza first. Let me know. ok 307
formal general Hey, are you coming tonight? I was thinking we could grab pizza first. Let me know. ok 210
casual email hey,⏎⏎are you coming tonight? um i was thinking we could grab pizza first. let me know ok 300
semi-casual email hey,⏎⏎are you coming tonight? um I was thinking we could grab pizza first. let me know ok 191
semi-formal email Hey,⏎⏎Are you coming tonight? I was thinking we could grab pizza first. Let me know. ok 203
formal email Hey,⏎⏎Are you coming tonight? I was thinking we could grab pizza first. Let me know. ok 282

chat-lunch raw: hey are you free for lunch tomorrow lets do twelve if that works for you

styling context output guard ms
casual general hey are you free for lunch tomorrow? lets do 12 if that works for you ok 220
semi-casual general hey, are you free for lunch tomorrow? let's do 12 if that works for you ok 208
semi-formal general Hey, are you free for lunch tomorrow? Let's do 12 if that works for you. ok 301
formal general Hey, are you free for lunch tomorrow? Let us do 12 if that works for you. ok 366
casual email hey,⏎⏎are you free for lunch tomorrow? lets do 12 if that works for you ok 198
semi-casual email hey,⏎⏎are you free for lunch tomorrow? let's do 12 if that works for you ok 199
semi-formal email Hey,⏎⏎Are you free for lunch tomorrow? Let's do 12 if that works for you. ok 194
formal email Hey,⏎⏎Are you free for lunch tomorrow? Let us do 12 if that works for you. ok 213

chat-running-late raw: omg im so sorry im running like ten minutes late save me a seat

styling context output guard ms
casual general omg im so sorry im running like 10 minutes late save me a seat ok 168
semi-casual general omg, I'm so sorry, I'm running like 10 minutes late. save me a seat ok 157
semi-formal general I'm so sorry, I'm running like 10 minutes late. Save me a seat. ok 146
formal general I am so sorry, I am running like 10 minutes late. Save me a seat. ok 152
casual email omg im so sorry im running like 10 minutes late. save me a seat ok 140
semi-casual email omg, I'm so sorry, I'm running like 10 minutes late. save me a seat ok 156
semi-formal email I'm sorry, I'm running like 10 minutes late. Save me a seat. REJECT (Cleanup output reads like a chat reply) 131
formal email I am so sorry, I am running like 10 minutes late. Save me a seat. ok 138

work-status-update raw: hey team quick update um the api migration is done and i deployed it to staging this morning can someone review the pr b…

styling context output guard ms
casual general hey team quick update um the api migration is done and i deployed it to staging this morning. can someone review the pr before friday? ok 179
semi-casual general hey team, quick update. um the API migration is done, and I deployed it to staging this morning. can someone review the PR before Friday? ok 192
semi-formal general Hey team, quick update. The API migration is done, and I deployed it to staging this morning. Can someone review the PR before Friday? ok 187
formal general Hey team, quick update. The API migration is done, and I deployed it to staging this morning. Can someone review the PR before Friday? ok 220
casual email hey team,⏎⏎quick update um the api migration is done and i deployed it to staging this morning. can someone review the pr before friday? ok 194
semi-casual email hey team,⏎⏎quick update, um the API migration is done and I deployed it to staging this morning. can someone review the PR before Friday? ok 185
semi-formal email Hey Team,⏎⏎Quick update, the API migration is done, and I deployed it to staging this morning. Can someone review the PR before Friday? ok 204
formal email Hey Team,⏎⏎Quick update, the API migration is done, and I deployed it to staging this morning. Can someone review the PR before Friday? ok 202

work-ask raw: hi tom do you have a few minutes today to go over the q four roadmap i want to make sure we are aligned before the all h…

styling context output guard ms
casual general hi tom do you have a few minutes today to go over the q4 roadmap? i want to make sure we are aligned before the all hands ok 186
semi-casual general hi Tom, do you have a few minutes today to go over the Q4 roadmap? I want to make sure we are aligned before the all hands ok 189
semi-formal general Hi Tom, do you have a few minutes today to go over the Q4 roadmap? I want to make sure we are aligned before the all hands ok 202
formal general Hi Tom, do you have a few minutes today to go over the Q4 roadmap? I want to make sure we are aligned before the all hands. ok 244
casual email hi tom,⏎⏎do you have a few minutes today to go over the q4 roadmap? i want to make sure we are aligned before the all hands ok 195
semi-casual email hi Tom,⏎⏎do you have a few minutes today to go over the Q4 roadmap? I want to make sure we are aligned before the all hands ok 191
semi-formal email Hi Tom,⏎⏎Do you have a few minutes today to go over the Q4 roadmap? I want to make sure we are aligned before the all-hands ok 203
formal email Hi Tom,⏎⏎Do you have a few minutes today to go over the Q4 roadmap? I want to make sure we are aligned before the all hands. ok 201

email-deck raw: hi maria thanks for sending the deck um i went through it last night and the pricing section looks great i have a couple…

styling context output guard ms
casual general hi maria thanks for sending the deck um i went through it last night and the pricing section looks great. i have a couple of small notes on the timeline which i… ok 253
semi-casual general hi Maria, thanks for sending the deck. um I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, whi… ok 280
semi-formal general Hi Maria, thanks for sending the deck. I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, which … ok 281
formal general Hi Maria, thanks for sending the deck. I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, which … ok 284
casual email hi maria,⏎⏎thanks for sending the deck. i went through it last night and the pricing section looks great. i have a couple of small notes on the timeline which i… ok 258
semi-casual email hi Maria,⏎⏎thanks for sending the deck. I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, which… ok 261
semi-formal email Hi Maria,⏎⏎Thanks for sending the deck. I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, which… ok 285
formal email Hi Maria,⏎⏎Thanks for sending the deck. I went through it last night, and the pricing section looks great. I have a couple of small notes on the timeline, which… ok 274

email-intro raw: hello priya i hope you are doing well i wanted to introduce you to lukas who leads our design team he has some great ide…

styling context output guard ms
casual general hello priya i hope you are doing well. i wanted to introduce you to lukas who leads our design team. he has some great ideas for the onboarding flow and i think… ok 296
semi-casual general hello Priya, I hope you are doing well. I wanted to introduce Lukas, who leads our design team. he has some great ideas for the onboarding flow, and I think you… ok 317
semi-formal general Hello Priya, I hope you are doing well. I wanted to introduce Lukas, who leads our design team. He has some great ideas for the onboarding flow, and I think you… ok 511
formal general Hello Priya, I hope you are doing well. I wanted to introduce Lukas, who leads our design team. He has some great ideas for the onboarding flow, and I think you… ok 337
casual email hello priya,⏎⏎i hope you are doing well. i wanted to introduce you to lukas who leads our design team. he has some great ideas for the onboarding flow and i thi… ok 319
semi-casual email hello Priya,⏎⏎I hope you are doing well. I wanted to introduce Lukas, who leads our design team. he has some great ideas for the onboarding flow, and I think yo… ok 331
semi-formal email Hello Priya,⏎⏎I hope you are doing well. I wanted to introduce Lukas, who leads our design team. He has some great ideas for the onboarding flow, and I think yo… ok 326
formal email Hello Priya,⏎⏎I hope you are doing well. I wanted to introduce Lukas, who leads our design team. He has some great ideas for the onboarding flow, and I think yo… ok 348

email-reply-see-you raw: sounds good see you then

styling context output guard ms
casual general sounds good. see you then ok 59
semi-casual general sounds good. see you then ok 55
semi-formal general Sounds good. See you then. ok 59
formal general Sounds good. See you then. ok 60
casual email sounds good. see you then ok 53
semi-casual email sounds good. see you then ok 55
semi-formal email Sounds good. See you then. ok 63
formal email Sounds good. See you then. ok 65

email-reply-works raw: thanks that works for me

styling context output guard ms
casual general thanks that works for me ok 51
semi-casual general thanks, that works for me ok 55
semi-formal general Thanks, that works for me. ok 58
formal general Thanks, that works for me. ok 57
casual email thanks that works for me ok 50
semi-casual email thanks,⏎⏎that works for me ok 55
semi-formal email Thanks,⏎⏎That works for me. ok 61
formal email Thanks, that works for me. ok 63

email-reply-attached raw: sure i attached the updated contract let me know if you have any questions

styling context output guard ms
casual general sure i attached the updated contract. let me know if you have any questions ok 111
semi-casual general sure, I attached the updated contract. let me know if you have any questions ok 119
semi-formal general Sure, I attached the updated contract. Let me know if you have any questions. ok 128
formal general Sure, I attached the updated contract. Let me know if you have any questions. ok 128
casual email sure i attached the updated contract. let me know if you have any questions ok 110
semi-casual email sure I attached the updated contract. let me know if you have any questions ok 136
semi-formal email Sure, I attached the updated contract. Let me know if you have any questions. ok 168
formal email Sure, I attached the updated contract. Let me know if you have any questions. ok 147

ending-pm-dotted raw: can we move the call to tomorrow at 3 p.m.

styling context output guard ms
casual general can we move the call to tomorrow at 3pm? ok 105
semi-casual general can we move the call to tomorrow at 3pm? ok 100
semi-formal general Can we move the call to tomorrow at 3pm? ok 102
formal general Can we move the call to tomorrow at 3pm? ok 137
casual email can we move the call to tomorrow at 3pm? ok 127
semi-casual email can we move the call to tomorrow at 3pm? ok 116
semi-formal email Can we move the call to tomorrow at 3pm? ok 106
formal email Can we move the call to tomorrow at 3pm? ok 94

ending-pm-spoken raw: ill be home around five pm

styling context output guard ms
casual general ill be home around 5pm ok 66
semi-casual general I'll be home around 5pm ok 71
semi-formal general I'll be home around 5pm. ok 77
formal general I will be home around 5pm. ok 73
casual email ill be home around 5pm ok 60
semi-casual email I'll be home around 5pm ok 66
semi-formal email I'll be home around 5pm. ok 70
formal email I will be home around 5pm. ok 70

ending-url-spoken raw: the new build is up check voice dot app

styling context output guard ms
casual general the new build is up check voice.app ok 65
semi-casual general the new build is up check voice.app ok 70
semi-formal general The new build is up.check. Voice. ok 72
formal general The new build is up.check. Voice. ok 70
casual email the new build is up check voice.app ok 66
semi-casual email the new build is up check voice.app ok 76
semi-formal email The new build is up.check. Voice. ok 78
formal email The new build is up.check. Voice. ok 76

ending-url-written raw: for the docs go to example.com

styling context output guard ms
casual general for the docs go to example.com ok 63
semi-casual general for the docs, go to example.com ok 71
semi-formal general For the docs, go to example.com. ok 73
formal general For the docs, go to example.com. ok 71
casual email for the docs go to example.com ok 75
semi-casual email for the docs, go to example.com ok 66
semi-formal email For the docs, go to example.com. ok 72
formal email For the docs, go to example.com. ok 74

ending-trailing-off raw: i was going to say something but um i dont know...

styling context output guard ms
casual general i was going to say something but i dont know ok 88
semi-casual general I was going to say something, but I don't know ok 94
semi-formal general I was going to say something, but I don't know. ok 100
formal general I was going to say something, but I do not know. ok 100
casual email i was going to say something but i dont know ok 83
semi-casual email I was going to say something, but I don't know ok 94
semi-formal email I was going to say something, but I don't know. ok 97
formal email I was going to say something, but I do not know. ok 98

ending-question raw: did you get a chance to look at the proposal

styling context output guard ms
casual general did you get a chance to look at the proposal? ok 81
semi-casual general did you get a chance to look at the proposal? ok 86
semi-formal general Did you get a chance to look at the proposal? ok 81
formal general Did you get a chance to look at the proposal? ok 84
casual email did you get a chance to look at the proposal? ok 81
semi-casual email did you get a chance to look at the proposal? ok 88
semi-formal email Did you get a chance to look at the proposal? ok 85
formal email Did you get a chance to look at the proposal? ok 83

names-github-api raw: can you ask kenji to push the fix to github before the api review with nasa

styling context output guard ms
casual general can you ask kenji to push the fix to github before the api review with nasa? ok 140
semi-casual general can you ask Kenji to push the fix to GitHub before the API review with NASA? ok 132
semi-formal general Can you ask Kenji to push the fix to GitHub before the API review with NASA? ok 133
formal general Can you ask Kenji to push the fix to GitHub before the API review with NASA? ok 125
casual email can you ask kenji to push the fix to github before the api review with nasa? ok 144
semi-casual email can you ask Kenji to push the fix to GitHub before the API review with NASA? ok 181
semi-formal email Can you ask Kenji to push the fix to GitHub before the API review with NASA? ok 167
formal email Can you ask Kenji to push the fix to GitHub before the API review with NASA? ok 144

note-reminder raw: remember to um buy milk and call the dentist on thursday about the appointment

styling context output guard ms
casual general remember to buy milk and call the dentist on thursday about the appointment ok 107
semi-casual general remember to buy milk and call the dentist on Thursday about the appointment ok 134
semi-formal general Remember to buy milk and call the dentist on Thursday about the appointment. ok 133
formal general Remember to buy milk and call the dentist on Thursday about the appointment. ok 124
casual email remember to buy milk and call the dentist on thursday about the appointment ok 113
semi-casual email remember to buy milk and call the dentist on Thursday about the appointment ok 130
semi-formal email Remember to buy milk and call the dentist on Thursday about the appointment. ok 141
formal email Remember to buy milk and call the dentist on Thursday about the appointment. ok 144

note-idea raw: idea for the blog post we could write about how we cut startup time in half and what we learned

styling context output guard ms
casual general idea for the blog post we could write about how we cut startup time in half and what we learned ok 157
semi-casual general idea for the blog post we could write about how we cut startup time in half and what we learned ok 183
semi-formal general Idea for the blog post we could write about how we cut startup time in half and what we learned. ok 217
formal general Idea for the blog post we could write about how we cut startup time in half and what we learned. ok 205
casual email idea for the blog post we could write about how we cut startup time in half and what we learned ok 158
semi-casual email idea for the blog post we could write about how we cut startup time in half and what we learned ok 141
semi-formal email Idea for the blog post we could write about how we cut startup time in half and what we learned. ok 150
formal email Idea for the blog post we could write about how we cut startup time in half and what we learned. ok 151

long-email raw: hi team um quick update on the plan for the next two weeks. maria will review the pricing page by monday and send a shor…

styling context output guard ms
casual general hi team um quick update on the plan for the next two weeks. maria will review the pricing page by monday and send a short update to tom before 1pm. tom will fix… (2 chunks) ok, ok 3323
semi-casual general hi team, um quick update on the plan for the next two weeks. Maria will review the pricing page by Monday and send a short update to Tom before 1pm. Tom will fi… (2 chunks) ok, ok 3157
semi-formal general Hi team, quick update on the plan for the next two weeks. Maria will review the pricing page by Monday and send a short update to Tom before 1pm. Tom will fix t… (2 chunks) ok, ok 3525
formal general Hi team, quick update on the plan for the next two weeks. Maria will review the pricing page by Monday and send a short update to Tom before 1pm. Tom will fix t… (2 chunks) ok, ok 3449
casual email hi team,⏎⏎quick update on the plan for the next two weeks. maria will review the pricing page by monday and send a short update to tom before 1pm. tom will fix … (2 chunks) ok, ok 3335
semi-casual email hi team,⏎⏎um quick update on the plan for the next two weeks. Maria will review the pricing page by Monday and send a short update to Tom before 1pm. Tom will f… (2 chunks) ok, ok 3236
semi-formal email Hi Team,⏎⏎Quick update on the plan for the next two weeks. Maria will review the pricing page by Monday and send a short update to Tom before 1pm. Tom will fix … (2 chunks) ok, ok 3411
formal email Hi Team,⏎⏎Quick update on the plan for the next two weeks. Maria will review the pricing page by Monday and send a short update to Tom before 1pm. Tom will fix … (2 chunks) ok, ok 3155

Tradeoffs

  • context is optional with a general default inside the prompt builder. A required field would touch the worker schema, WARM_UP_STYLE, BUSY_STYLE and the dictation call site, and PR 2 replaces all of them with a required layout.
  • One row per call (not per chunk) keeps the latency honest for multi-chunk fixtures. Older recordings no longer load.

Blast Radius

The app never sets context, so cleanup prompts are byte-identical (prompt.test.ts). The desktop typecheck passes with the new optional field. The script and fixtures only run by hand.

Verification

  • vp test run src/prompt.test.ts in packages/cleanup: 2 passed. Defaulting to email instead of general fails the exact-bytes test.
  • tsc --noEmit in packages/cleanup (covers scripts/) and in apps/desktop: clean.
  • Real sweep: node packages/cleanup/scripts/calibrate.mts ~/Library/Caches/Voice\ Development/test-models/s1-mini-q4_k_m.gguf <recording.jsonl> ran to completion with 968 rows, 1008 chunks and 77 rejected. Every row above comes from that run.
  • No UI changes, so there was no live app run.

The prompt pinned [Context: general]. Calibration needs to request the
model's trained email layout. An optional context field on the S1 style
does that; every app caller omits it and still sends general with the
same prompt bytes.

Part of #281
…youts

The sweep now runs every fixture under each Styling tag and both Context
values, and records one row per fixture, styling and context with its
latency. New synthetic fixtures cover chat lines, a work message, emails
with greeting and sign-off, one-line email replies, endings that stress a
final-period rule, and a long email that spans two cleanup chunks.

Part of #281
@github-actions github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Oct 16, 2026
@hadrysm
hadrysm added this pull request to stack #290 October 16, 2026 08:33
@hadrysm
hadrysm merged commit 0c48f5f into main Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant